import random

anwser =random.randint(1,10)
while True:
    num =(int)(input("请输入一个数(1-10):"))
    if num==anwser :
        print("恭喜你猜对了")
        break
    elif num>anwser :
        print("猜大了")
    else:
        print("猜小了")

